home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGMISC / FPCHELP.LZH / SED.TXT < prev    next >
Text File  |  1988-08-15  |  20KB  |  487 lines

  1. \ SED.TXT       The sequential editors documentation    by Tom Zimmer
  2.  
  3. SED and Overview
  4.  
  5.           SED is a text editor implemented in Forth, with cursor
  6.         movement key sequences similar to WordStar.
  7.  
  8.           Sed provides pull-down menus for ease of operation, with
  9.         on-line help for most functions. Press ESC to pop up the
  10.         menubar, then type the first letter of the menu name to see
  11.         the menu. Press the FIRST CAPITALIZED letter of a menu item
  12.         to pick that item, or use the arrow keys to step down to it
  13.         and press <Enter>. Press ESC again to clear the menubar.
  14.  
  15.           The on-line help is brought on screen by pressing F1, after
  16.         which you can press any of the NUMBER keys to see the
  17.         additional help screen on various topics as described in the
  18.         F1 screen. Press ESC to return to the editor.
  19.  
  20.  
  21.                     Glossary of Editor Operations
  22.  
  23.  
  24. Column Move Right                       Alt-L
  25.  
  26.           All of the lines of a column of data can be moved to the
  27.         right by a number of characters from 1 to 9. the specified
  28.         number of spaces are inserted at the column of all lines from
  29.         the current line until a blank line is encountered.
  30.  
  31.  
  32. Copying Lines                           F3 & F5
  33.  
  34.           Lines can be copied from one place in a file to another,
  35.         with the Mark-F3, and Copy Line-F5 commands.  Move to the
  36.         first line of the block of text you wish to copy, and Mark
  37.         the start of the copy with Mark-F3, now move to the place
  38.         where you want to copy the text to, and press Copy-F5 once
  39.         for each line you want to copy.
  40.  
  41.  
  42. Copying text to a File                  Alt-C and Shift Alt-C
  43.  
  44.           SED can copy lines of text to another file. With Alt-C, first
  45.         go to the first line of text you want to copy, and press F3
  46.         mark to mark the start of the block copy.  Then move to the
  47.         last line of text you want to cut, and press Alt-C.  This will
  48.         cause all of the lines between and including the start and end
  49.         line to be written out to the file TEMP.SEQ.  To specify a
  50.         different filename to copy to, press Shift-Alt-C, instead of
  51.         Alt-C and you will be prompted for a name to write to.  See
  52.         also "Cutting text to a File", and "Copying from a File".
  53.  
  54.  
  55.  
  56. Cutting text to a File                  Alt-X and Shift Alt-X
  57.  
  58.           SED can cut lines of text to another file.  With Alt-X,
  59.         first go to the first line of text you want to cut, and press
  60.         F3 mark to mark the start of the block cut.  Then move to the
  61.         last line of text you want to cut, and press Alt-X. This will
  62.         cause all of the lines between and including the start and end
  63.         line to be written out to the file TEMP.SEQ. The lines will
  64.         also be deleted from the current file. To specify a different
  65.         filename to cut to, press Shift-Alt-X, instead of Alt-X,
  66.         and you will be prompted for a name to write to. See also
  67.         "Pasting from a File", and "Copying from a File".
  68.  
  69.  
  70. Delete and Un-Delete lines              Control-Y  &  Alt-Y
  71.  
  72.           Lines can be deleted with Ctrl-Y, and un-deleted with
  73.         Alt-Y.  Any lines which are deleted are saved in a line
  74.         delete buffer which currently has room for 50 lines.  This is
  75.         also the number of line deletes which can be un-deleted.
  76.  
  77.  
  78. Delete Leading Blanks from a Column     Shift-Alt-L
  79.  
  80.           All of the spaces in the current line at the cursor column
  81.         to the right are removed. This is done to each following line
  82.         until a blank line is encountered.
  83.  
  84.  
  85. DRAWING with the line character set     F9
  86.  
  87.           Pressing F9 will enter a character line drawing mode. You
  88.         can press the arrow keys to move around on the screen and
  89.         draw lines. This is most useful for prettying up your
  90.         documentation. Pressing F9 or ESC will take you back to
  91.         normal edit mode.
  92.  
  93.  
  94. Expanding TABS in a file                Alt-O X
  95.  
  96.           To expand TABS which appear in a file as small diamonds,
  97.         press Alt-O (option), followed by X expand tabs.  All TABS in
  98.         the current file starting at the cursor will be expanded to
  99.         eight (8) character columns.
  100.  
  101.  
  102. Exporting to another file               Alt-W
  103.  
  104.           The current edit file can be written out to another file.
  105.         By pressing Alt-W, you will be asked for the name of the file
  106.         to write out to.  The entire file contents in memory will be
  107.         written out to the new filename.  If you want to export a
  108.         small amount of text to another file, you can use the Alt-X
  109.         Export function.
  110.  
  111. HELP, on line                           F1
  112.  
  113.           Press F1 for on-line help on the various commands
  114.         available.
  115.  
  116.  
  117. Inserting Special characters in SED     <not currently assigned>
  118.  
  119.           The F10 function allows any single character which can be
  120.         generated by the keyboard to be inserted into SED.  Simply
  121.         press F10 followed by the key you want to insert.  Function
  122.         keys are mapped to characters above 127, so they will show up
  123.         as graphics characters.
  124.  
  125.  
  126. Left Margin                             Ctrl-L
  127.  
  128.           The left margin on the screen defaults to column zero, but
  129.         when printed, defaults to 2 spaces, so it is not normally
  130.         necessary to insert a left margin.  However, when TAB is
  131.         pressed, the left margin on screen is expanded by 8
  132.         characters.  Any subsequent lines typed in will maintain this
  133.         margin.  The left margin can be set at any column position.
  134.         Move the cursor to the column where you want the left margin
  135.         set and press Ctrl-L.
  136.  
  137.  
  138. LOWER CASE conversion                   Alt-O L
  139.  
  140.           To convert the current line to lower case, press Alt-O
  141.         (option), followed by L.  All upper case characters in the
  142.         current line will be converted to lower case. See also UPPER
  143.         CASE conversion.
  144.  
  145.  
  146. MACROS and F-PC                           Alt-M, Alt-1..5
  147.  
  148.           SED does not have macros built into it, but a file is
  149.         provided called MACROS.SEQ, which implements macros in Forth
  150.         that can be used in SED.  These macros work exactly the same
  151.         as they work in ZED.  That is, you use Alt-M to start
  152.         defining a macro, followed by one of the Alt-1 to Alt-5 keys
  153.         for the macro you are defining.  Next you enter any keys you
  154.         want included in the macro, and finally press Alt-M again to
  155.         complete the macro definition.  To perform a macro, simply
  156.         press one of the Alt-1 through Alt-5 keys by it self, and the
  157.         keys saved will be performed.
  158.  
  159.  
  160. Marker, Page Break  (a down pointing arrow head)
  161.  
  162.           The down pointing arrow head symbol is used by SED to mark
  163.         the first line of a NEW page, so you will notice this symbol
  164.         appears at the left edge of the screen at the top of the
  165.         document.
  166.  
  167.  
  168. Marker, End of File (an up  pointing arrow head)
  169.  
  170.           The up pointing arrow head symbol is used by SED to mark
  171.         the last line of text in the file.
  172.  
  173.  
  174. MENUS, Displaying and using             ESC
  175.  
  176.           Pressing the ESC key while editing, changes the first edit
  177.         line to display the MENUBAR. The most recently used menu item
  178.         will be in reverse video. If you press DOWN ARROW, the menu
  179.         contests for the highlighted menu will be pulled down, you
  180.         can then press LEFT and RIGHT ARROW to step across the menus.
  181.         Press <ENTER> when the menu item you want is selected.  you
  182.         can also select menu items by pressing the first UPPERCASE
  183.         LETTER in a menubar or menu item. The final way you can
  184.         select a menu item, is to note the Alt or Control key to use
  185.         for the desired item, and then press that key AFTER pressing
  186.         ESC again to make the menubar disappear.
  187.  
  188.  
  189. Pasting the DATE & TIME                 Alt-O P
  190.  
  191.           You can paste the date and time into a document at any time, with
  192.         Alt-O P.
  193.  
  194.  
  195. Pasting from a File                     Alt-V
  196.  
  197.           Text which has been cut with the Alt-X (cut) command to the
  198.         TEMP.SEQ file can be pasted back with Alt-V, the paste
  199.         command.  If you want to paste a file other than TEMP.SEQ, you
  200.         can press Shift-Alt-V, and a window will pop-up for you to
  201.         select a file from.  If you press Esc during the paste, or
  202.         while in the file selection window, the import operation will
  203.         be aborted.  See also "Cutting text to a File".
  204.  
  205.  
  206. Printing Documents                      Alt-P
  207.  
  208.           Printing can be initiated Alt-P.  It will take you to a
  209.         screen where you can set the printing parameters, like first
  210.         and last page to print, copies to print, etc.  These values
  211.         default to the most common situation, which is to print all
  212.         of a document once.  To start printing, press "P", or press
  213.         ESC to abort.
  214.  
  215.  
  216. Reading Foreign documents               Alt-K  Tab expansion
  217.  
  218.           If you want to read a text file from an editor which imbeds
  219.         Tabs, you will see this character " " in many places in the
  220.         file when you first start editing it.  If you do see these
  221.         Tab characters, press Alt-K, and these characters will be
  222.         expanded to spaces properly.  This process will increase the
  223.         size of the file somewhat, so if you are doing this to a very
  224.         large file, you may run out of the 64000 character memory
  225.         space available. WordStar document files will need to passed
  226.         through a conversion utility before being edited by SED.
  227.  
  228.  
  229. Replacing Text                          F8-Replace & Alt-F8
  230.  
  231.           After a Search has been done, you can replace the text
  232.         found.  Press F8.  You will be asked for a replacement
  233.         string, which will be used to replace the found text, when
  234.         return is pressed.  To search for the next occurrence of the
  235.         same text, press Alt-F6, and to replace the next found
  236.         occurrence with the same replacement text, press Alt-F8.
  237.  
  238.  
  239. Replacing All Occurrences of Text        Shift-F8
  240.  
  241.           Having already performed a Search (F6) and Replace (F8)
  242.         once, you can replace all occurrences of search text with
  243.         replacement text by pressing Shift-F8.
  244.  
  245.  
  246. Searching for Text                      F6-Search & Alt-F6
  247.  
  248.           You can look for any sequence of characters in SED with the
  249.         Search-F6 key.  When F6 is pressed, you are asked to enter a
  250.         text string to look for.  SED will look for that string of
  251.         characters when you press <return>.  When SED searches for
  252.         text, it ignores the case of the letters.  If you want SED to
  253.         look at the CaSe of the text it searches, hold down SHIFT
  254.         while pressing <return>.  This search is much faster.  To
  255.         search for another occurrence of the same text string, press
  256.         Alt-F6 (or SHIFT Alt-F6 if you want only an exact match).
  257.         See also the earlier section on Replacing Text.
  258.  
  259. Searching for Text Backwards            Shift-F6
  260.  
  261.           Having already done a search using F6 above, you can also
  262.         search backwards with Shift-F6, which searches backwards from
  263.         the cursor with a CaSe sensitive search.
  264.  
  265.  
  266. Selecting a File to Edit
  267.  
  268.           A new file selection mechanism has been added.  When you
  269.         are being asked to enter a new filename, if you press ENTER
  270.         without entering a filename, a window will pop up allowing
  271.         you to select a file from the directory.  If you are in a
  272.         sub-directory when the window appears, then a file named "."
  273.         and a file named ".." will appear at the top of the file
  274.         list.  These files, along with any directories below the
  275.         current directory, will display a graphic "infinity" symbol
  276.         "∞" to the right of the filename.  If you press <return>
  277.         while positioned on the "." name you will select the ROOT
  278.         directory.  The ".." name will pop up one level of directory,
  279.         and any other name with the "infinity" symbol next to it will
  280.         step you down one level to that directory.  You can move
  281.         between files in the list, with the keypad arrow keys, and
  282.         select a file by pressing ENTER.  Escape can be used to abort
  283.         file selection.  While in the pop up file selection mode, you
  284.         can also set the current drive by pressing a letter key
  285.         between A and G.  This drive must exist and have a disk in
  286.         it, or a system error will result.  The path and the current
  287.         drive is displayed in the lower right.  The path can be
  288.         changed by pressing the "\" key, then typing the new path
  289.         followed by the return key.
  290.  
  291.           A filename can be specified on the command line when
  292.         starting SED, and may include a directory specification.
  293.  
  294. Sorting the lines of a paragraph        F7
  295.  
  296.           An interesting although relatively slow function in SED is
  297.         the F7 key that will sort the lines of the current paragraph
  298.         starting on the cursor line and continuing until a blank line
  299.         is encountered.  The sort starts at the current column, and
  300.         tests the next 10 characters to perform the sort.  It is
  301.         possible to create simple databases or phone lists, by
  302.         placing different peices if information at specific columns,
  303.         and using F7 to sort according to these columns as needed.
  304.         For example I have a phone list that I can sort according to
  305.         firstname, lastname, areacode, state, or zip as needed.
  306.  
  307. Status Line
  308.  
  309.           The top line of the display shows the current edit status,
  310.         starting with INSERT/OVERWRITE status, which is also shown by
  311.         a thicker cursor for insert mode.  The current Column and
  312.         Line number are then displayed, followed by the page number,
  313.         total lines in file and total characters in file.
  314.  
  315.  
  316. Tab setting                             Alt-T
  317.  
  318.           Set the TAB key to tab to the current column, if you are on
  319.         column 4, TABS will occur at column 4, 8, 12, 16, etc.
  320.  
  321.  
  322. UPPER CASE conversion                   Alt-O U
  323.  
  324.           To convert the current line to UPPER CASE, press Alt-O
  325.         (option), followed by U.  All upper case characters in the
  326.         current line will be converted to UPPER CASE. See also LOWER
  327.         CASE conversion.
  328.  
  329.  
  330.  
  331. Wordstar key functions
  332.  
  333.           SED tries somewhat half heartedly to be WordStar
  334.         compatible. The cursor movement keys, Control
  335.         A,S,D,F,E,X,C,R,W and Z have been maintained, as have the
  336.         delete keys Control G,T,Y, and Del.
  337.  
  338.  
  339.  
  340.                         Key Definition Index
  341.  
  342. Control keys
  343.  
  344.         A       Previous word.
  345.         B       Paragraph reformat
  346.         C       Next page, Page Down.
  347.         D       Right one character.
  348.         E       Previous line, Up Line.
  349.         F       Forward, Next word.
  350.         G       Delete the character UNDER the cursor.
  351.         H       Move left one character non-destructively.
  352.         I       Same as TAB.
  353.         J       ..
  354.         K       ..
  355.         L       Set left margin to current column.
  356.         M       Like the <return> key.
  357.         N       Split line at cursor.  See also Alt-N (join line).
  358.         O       ..
  359.         P       ..
  360.         Q       ..
  361.         R       Previous page, Page Up.
  362.         S       Left one character.
  363.         T       Delete the word to the right.
  364.         U       Update, save changes up to this moment.
  365.         V       Insert/ Overwrite mode toggle.
  366.         W       Scroll screen down.
  367.         X       Next line, Down Line.
  368.         Y       Cut/Delete the current Line.
  369.         Z       Scroll the screen up.
  370.  
  371.  
  372. Keypad Functions
  373.  
  374.         ESC         POP-UP the MENUBAR.
  375.         Home        Goto beginning of line.
  376.         End         Goto end of line.
  377.         PgUp        Go back towards beginning of document 12 lines.
  378.         PgDn        Go towards end of document 12 lines.
  379.         Ctrl-Home   Go to First line of document.
  380.         Ctrl-End    Goto last line of document.
  381.         Ins         Toggle between Insert and Overwrite mode.
  382.         Del         Delete the character under the cursor.
  383.  
  384.  
  385.  
  386.  
  387. Alternate Keys
  388.  
  389.         A       APPEND marked text to TEMP.SEQ.
  390.         B       ..
  391.         C       Copy Text from Mark to TEMP.SEQ.
  392.         D       ..
  393.         E       ..
  394.         F       ..
  395.         G       Prompt for PAGE to GOTO.
  396.         H       ..
  397.         I       ..
  398.         J       ..
  399.         K       ..
  400.         L       Set left margin to current column.
  401.         M       DEFINE a MACRO.
  402.         N       Join Lines, the inverse of Control N.
  403.         O       U-uppercase Line, L-lowercase line, P-Paste date/time,
  404.                 X-eXpand TABS to spaces
  405.         P       Enter the PRINT menu.
  406.         Q       Goto beginning of the file.
  407.         R       REPEAT a macro.
  408.         S       SETUP Right Margin, and WINDOW size.
  409.         T       Set the TAB key to expand to the current column.
  410.         U       Word Undelete, undeletes the last 10 words or so.
  411.         V       Import a file, pops up a selection window.
  412.         W       SAVEAS, Write entire file to a new file.
  413.         X       CUT lines from mark through cursor to TEMP.SEQ
  414.         Y       Un-delete lines.
  415.         Z       Goto the end of the file.
  416.  
  417.  
  418. Function Keys
  419.  
  420.         F1      Online HELP
  421.         F2      Go to TOP of screen
  422.         F3      Mark line, for copy lines, and export lines.
  423.         F4      Go to BOTTOM of screen
  424.         F5      Get a line from the mark.
  425.         F6      Search, prompts for search text.
  426.         F7      SORT the line of the current paragraph.
  427.         F8      Replace, prompts for replace text, must do F6 first.
  428.         F9      Enter LINE DRAWING mode.
  429.         F10     SAVE and EXIT the editor.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.         Alt-F1  ..
  442.         Alt-F2  ..
  443.         Alt-F3  ..
  444.         Alt-F4  ..
  445.         Alt-F5  ..
  446.         Alt-F6  Search for same text again, no prompt.
  447.         Alt-F7  ..
  448.         Alt-F8  Replace with same text again, no prompt and do Alt-F6.
  449.         Alt-F9  ..
  450.         Alt-F10 DISCARD CHANGES and leave the editor.
  451.  
  452.         Shift-F6
  453.                 Search for text backwards, CaSe sensitive.
  454.         Shift-F8
  455.                 Replace all occurrences, use after F6 and F8.
  456.  
  457.         Shift-Alt-F6
  458.                 Search for same text again, no prompt Case Sensitive.
  459.         Shift-Alt-F8
  460.                 Replace with same text again, no prompt Case Sensitive.
  461.  
  462.  
  463. NOTES on F6 and F8
  464.  
  465.           The straight key, F6 or F8 will perform the specified
  466.         operation, with a prompt for a text string parameter.  The
  467.         operation is performed with a case insensitive search.  That
  468.         is, "CaSe" is the same as "case".
  469.  
  470.           The Alt-F6 or Alt-F8 performs the same function, but with
  471.         the same text string as was entered with the non-Alt key.
  472.         Again, the search is case insensitive.
  473.  
  474.           Holding down Shift while pressing return on F6, Alt-F6 or
  475.         Alt-F8 will cause the search to be done CASE SENSITIVE.  That
  476.         is, "CaSe" is NOT the same as "case".
  477.  
  478.           And finally, pressing Shift-F8, WITHOUT ALT, causes a
  479.         global replace all occurrences to be performed.
  480.  
  481.           While the above may seem confusing at first, it provides a
  482.         lot of flexibility and power for search and replace
  483.         operations.  Try these commands on a junk file until you
  484.         become familiar with their operation.
  485.  
  486.  
  487.